package com.fish.passport.dao;

import java.util.List;
import java.util.Map;

import com.fish.common.dao.BaseIbatisDao;
import com.fish.passport.po.PassProduct;
/**
 * 通关产品
 * @author chenlinjun
 *
 */
public class PassProductDAO extends BaseIbatisDao{
	/**
	 * 按条件查询
	 * 
	 * @param 查询参数
	 */

	public PassProduct selectPassProductByParams(Map<String, Object> params) {
		return (PassProduct)super.getSqlMapClientTemplate().queryForObject(
				"PASS_PRODUCT.selectPassProduct", params);
	}
	
	public Long insertPassProduct(PassProduct passProduct){
		return (Long)super.getSqlMapClientTemplate().insert("PASS_PRODUCT.insertSelective", passProduct);
		
	}
	
	@SuppressWarnings("unchecked")
	public List<PassProduct> queryPassProduct(Map params){
		return super.getSqlMapClientTemplate().queryForList("PASS_PRODUCT.queryPassProduct", params);
		
	}

	public void updatePassProduct(PassProduct passProduct) {
		super.getSqlMapClientTemplate().update("PASS_PRODUCT.updateByPrimaryKeySelective", passProduct);
		
	}

	public void deletePassProduct(Long passProdId) {
		super.getSqlMapClientTemplate().delete("PASS_PRODUCT.deletePassProduct", passProdId);
		
	}

	public Integer selectRowCount(Map<String, Object> queryOption) {
		return (Integer) super.getSqlMapClientTemplate().queryForObject("PASS_PRODUCT.selectRowCount", queryOption);
	}
}
